package com.wuchao.spring.ioc;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Author wuchao66
 * @Date 2022/7/1 9:23
 * @Version 1.0
 */
public class TestIoc {
    public static void main(String[] args) {
       // Ioc ioc = new Ioc();
       // ioc.show("spring");//控制反转：以后不在调用的时候在这里输值
        ClassPathXmlApplicationContext cpac =
                new ClassPathXmlApplicationContext("ApplicationContext.xml");//拿到spring的配置文件
     Ioc ioc= (Ioc)cpac.getBean("Ioc");
     ioc.show();
     ioc.showUser();

    }
}
